﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Build;
using Microsoft.Build.Evaluation;

namespace Crude.VisualStudioAddin.Actions
{
    public class UpdateOverrideProjectAction : BaseProjectAction
    {
        public override string Name
        {
            get { return "UpdateOverrideProjectDependencies"; }
        }

        public override string Caption
        {
            get { return "Update Override Project Dependencies"; }
        }

        public override string Tooltip
        {
            get { return "Update the project dependencies fron the remote repository and override the local changes"; }
        }

        public override BaseProjectAction.ProjectCrudeStatus CrudeStatus
        {
            get { return ProjectCrudeStatus.Crude; }
        }

        protected override void InternalExecuteAction(EnvDTE80.DTE2 applicationObject, EnvDTE.Project project)
        {
            BuildEngine.Engine.Instance.Build(project.FullName, "UpdateLocalOverride", "Update and override local repository");            
        }
    }
}
